<?xml version="1.0"?>
<project   name="AgilePlannerDT" default="test">
	<property value="AgilePlannerDT" name="project" />
	<property value="${project}" name="hudsonProject" />
	<!-- Location of the APDT Project and the AP server -->
	<property name="build.dir" value="C:\.hudson\jobs\${hudsonProject}\workspace\${project}"/>
	
	<!-- Start by cleaning the build area -->
	<target name="clean" description="remove all build products" >
		<delete dir="build" if="${directory::exists('build.dir')}" />
	</target>
	
	<!-- Create a build area -->
	<target name="init" depends="clean">
		<mkdir dir="build"/>
	</target>
 
	<target name="compile" depends="init">
		<exec
			program="msbuild.exe"
			commandline="${project}.sln"/>
	</target>


	<target name="test" depends="compile"> 
		<delete dir="TestResults"/>
		<mkdir dir="TestResults"/>
		<exec
			program="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe">
			<arg value='/testmetadata:${project}.vsmdi' /> 
			<arg value='/nologo' /> 
			<arg value="/resultsfile:TestResults\testResults.trx" />
		</exec>
		
		<exec program="MSBuild">
			<arg value='/property:hudsonProjectRoot="C:\.hudson\jobs\${hudsonProject}\workspace\${project}" "C:\VSCodeCoverage\GenerateCoverage.build"' />
			</exec>
		
		<exec program="C:\MsBuildNunit\msxsl.exe">
			<arg value="C:\.hudson\jobs\${hudsonProject}\workspace\${project}\TestResults\TestOut\In\ASEBEAST\data.xml" />
			<arg value="C:\VSCodeCoverage\MSTestCoverageToEmma.xsl"/>
			<arg value='-o'/><arg value="C:\.hudson\jobs\${hudsonProject}\workspace\${project}\TestResults\coverage.xml"/>
		</exec>
	</target>

<!--
SET MSTest="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe"
SET XSLParser="C:\MsBuildNunit\msxsl.exe"

SET TestFile="C:\.hudson\jobs\TouchToolkit - WPF\workspace\Src\Solution files\WPF 4.0 Application.vsmdi"
SET TestOutFILE=TestResults\testResult.trx
SET TransformedOutputFile=%TestOutFILE:.trx=%.xml
SET XSLFile=c:\MsBuildNunit\MSBuild-to-NUnit.xslt

RMDIR TestResults /s /q
MKDIR TestResults

%MSTest% /testmetadata:%TestFile% /nologo /resultsfile:%TestOutFILE%

MSBuild /property:hudsonProject="TouchToolkit - WPF" "C:\VSCodeCoverage\GenerateCoverage.build" 

"C:\MsBuildNunit\msxsl.exe" "C:\.hudson\jobs\TouchToolkit - WPF\workspace\TestResults\TestOut\In\ASEBEAST\data.xml" "C:\VSCodeCoverage\MSTestCoverageToEmma.xsl" -o "C:\.hudson\jobs\TouchToolkit - WPF\workspace\TestResults\coverage.xml"
-->



</project>







